import { Input } from "antd"

import { SFormItem } from "@/components/common"
import { IInput } from "@/components/common/styled/types"
import { useLocale } from "@/locales"

const LabelName = ({ name, label, placeholder, rules, ...props }: { rules?: object[] } & IInput) => {
	const { formatMessage } = useLocale()

	return (
		<SFormItem label={label || formatMessage({ id: "member.label_name_to_configure" })} rules={rules} name={name}>
			<Input {...props} placeholder={placeholder || formatMessage({ id: "common.please_enter" })} />
		</SFormItem>
	)
}

export default LabelName
